-- GENERATED SPELL FOR [Scarlet Judge] --


function spell0_1837(pUnit, Event) --@Crusader Strike,n/a--
pUnit:FullCastSpellOnTarget(14518,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1837', 30318, 1)
end

function spell1_1837(pUnit, Event) --@Hammer of Justice,n/a--
pUnit:FullCastSpellOnTarget(13005,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1837', 6309, 1)
end

function spell2_1837(pUnit, Event) --@Holy Strike,n/a--
pUnit:FullCastSpellOnTarget(13953,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1837', 582, 1)
end

function Sorts_1837(pUnit, Event)
local choix_sorts_1837 = math.random(0, 2)
if choix_sorts_1837 == 0 then
pUnit:RegisterEvent('spell0_1837', 1, 1)
end
if choix_sorts_1837 == 1 then
pUnit:RegisterEvent('spell1_1837', 1, 1)
end
if choix_sorts_1837 == 2 then
pUnit:RegisterEvent('spell2_1837', 1, 1)
end
end

function mob1837_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_1837', math.random(1500, 3000), 1)
end

function mob1837_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1837_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1837_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(1837, 1, 'mob1837_Action')
RegisterUnitEvent(1837, 2, 'mob1837_Leave')
RegisterUnitEvent(1837, 3, 'mob1837_Kill')
RegisterUnitEvent(1837, 4, 'mob1837_Die')
